<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="../bootstrap-5.1.3-dist/css/bootstrap.css">
    <script src="../bootstrap-5.1.3-dist/js/bootstrap.js"></script>
</head>

<body class="container ">
    <div class="clearfix">
        <img src="1.jpg" class="float-start" width="200">
        <img src="1.jpg" class="float-end" width="200">
    </div>
    <p class="text-center">浮动类实现左右对齐</p>
    <div class="text-center">
        <img src="1.jpg" width="200">
        <p class="text-center">文本类实现水平居中</p>
    </div>
    <div>
        <img src="1.jpg" class="mx-auto d-block" width="200">
        <p class="text-center">外边距类实现水平居中</p>
    </div>
</body>

</html>